xen: Fix schedule()'s grabbing of the schedule lock
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Tue, 10 Apr 2012 09:41:30 +0000 (10:41 +0100)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Tue, 10 Apr 2012 09:41:30 +0000 (10:41 +0100)
commit4cee6a3812e9e81532f89b5be15d549faf49fffd
tree8dcafc4c215aba1c69962ce92b3726ad981c1c02
parent1f348a695fa0a22ee1e99c8972181de859ec3d87
xen: Fix schedule()'s grabbing of the schedule lock

Because the location of the lock can change between the time you read
it and the time you grab it, the per-cpu schedule locks need to check
after lock acquisition that the lock location hasn't changed, and
release and re-try if so.  This change was effected throughout the
source code, but one very important place was apparently missed: in
schedule() itself.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/common/schedule.c